package com.lwt.monstermall.auth;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;


/**
 * 核心原理
 * 1）.@EnableRedisHttpSession导入redisHttpSessionConfiguration配置
 *      1、给容器中添加了一个组件
 *          RedisOperationsSessionRepository：redis操作session。session的封装类
 *      2、SessionRepositoryFilter：session过滤器（每个请求都要经过filter）
 *          1、创建的时候，自动就从容器中获得SessionRepository
 *          2.原生的request 和 response都被包装了
 *
 *          装饰者模式
 */



@EnableRedisHttpSession //redis作为session存储
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
public class MallAuthServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(MallAuthServerApplication.class, args);
    }

}
